import csv

with open('./resources/excels/data.csv', 'w', newline='',encoding='utf-8') as f:
    writer = csv.writer(f)
    writer.writerow(['id', 'name', 'age'])
    writer.writerow([1, '张三', 18])
    writer.writerow([2, '李四', 19])
    writer.writerow([3, '王五', 20])